package com.imooc.checkparams;

import com.imooc.result.Result;
import com.imooc.result.ResultUtils;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by chenxin on 2017/4/30.
 */
@Component
public class CheckParams {
    //验证savaone
    public static Result checksaveone(HttpServletRequest request) {

        String name = request.getParameter("name");
//         if(Strings.isNullOrEmpty(name)){
        if ("".equals(name) || null == name) {
            return ResultUtils.errorSaveone();
        }
        return null;
    }
}
